# -*- coding: utf-8 -*-
# @Time    : 2021/3/26 16:25
# @Author  : Zhangrenjie
# @Email   : zhangrenjie1998@163.com
# @File    : Nong_Voice.py
# @Software: PyCharm

def menu():
    print('农大好声音报名系统'.center(50, '*'))
    print('1.查看报名详情'.center(50, ' '))
    print('2.报名好声音'.center(50, ' '))
    print('3.退出系统'.center(48, ' '))
    print('请输入相对于编号进行操作!')
    admin_input = input()
    if admin_input == '1':
        list()
    elif admin_input == '2':
        apply()
    elif admin_input == '3':
        exit()
def list():
    print('农大好声音报名系统'.center(50, '*'))
    print('姓名\t爱好\t家庭住址')
    for i, j in human_lsit.items():
        print(f'{i}\t{j.get("爱好")}\t{j.get("家庭地址")}')
    print("是否返回主页 q 返回")
    admin_input1 = input()
    if admin_input1 == 'q':
        menu()
def apply():
    print('农大好声音报名系统'.center(50, '*'))
    username = input("请输入你的姓名：")
    hobby = input("请输入你的爱好：")
    address = input("请输入你的家庭地址：")
    new_list = {username: {'爱好': hobby, '家庭地址': address}}
    human_lsit.update(new_list)
    print("报名成功！\n是否返回主页 q 返回")
    admin_input2 = input()
    if admin_input2 == 'q':
        menu()

human_lsit = {'张三': {'爱好': '唱歌', '家庭地址': '长沙'},
              '李四': {'爱好': '无', '家庭地址': '不详'},
              '王五': {'爱好': '略', '家庭地址': '湘乡'}}
menu()